<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/6/14
  Time: 21:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>Title</title>
    <!-- 引入 Bootstrap CSS -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/bootstrap4/css/bootstrap.css">
</head>
<body>
<%-- 公共common.jsp，需要使用el表达式获取当前的contextPath，然后使用${**}/格式引入所有静态资源。 --%>

<!-- 引入 jQuery -->
<script src="${pageContext.request.contextPath}/static/jquery/jquery-2.2.4.min.js"></script>
<!-- 引入 Bootstrap JS -->
<script src="${pageContext.request.contextPath}/static/bootstrap4/js/bootstrap.js"></script>
<%--后台菜单信息--%>
<%
    List<Map<String, String>> menuItems = new ArrayList<>();
    menuItems.add(new HashMap<String, String>() {{
        put("name", "用户管理");
        put("page", "userManagement.jsp");
    }});

    menuItems.add(new HashMap<String, String>() {{
        put("name", "商品管理");
        put("page", "product_management.jsp");
    }});

    request.setAttribute("menuItems", menuItems);
%>
<%--前台菜单信息--%>
<%
    List<Map<String, String>> frontmenuItems = new ArrayList<>();
    frontmenuItems.add(new HashMap<String, String>() {{
        put("name", "首页");
        put("page", "front-index.jsp");
    }});
    request.setAttribute("frontmenuItems", frontmenuItems);
%>
</body>
</html>
